package coreentity

import (
	"core/class"
	"core/datetime"
	"core/selfreg"
	"reflect"
)

type HtActionLog struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	Host          string          `json:"host"         validate:"max=50"   gorm:"column:host;size:50;DEFAULT:'';not null;comment:请求Host;"`
	Url           string          `json:"url"          validate:"max=50"   gorm:"column:url;size:50;DEFAULT:'';not null;comment:请求Url;"`
	Memo          string          `json:"memo"         validate:"max=200"  gorm:"column:memo;size:200;DEFAULT:'';not null;comment:操作;"`
	Glid          string          `json:"glid"         validate:"max=50"   gorm:"column:glid;size:50;DEFAULT:'';not null;comment:关联ID;"`
	Pin           string          `json:"pin"                              gorm:"column:pin;type:longtext;not null;comment:参数;"`
	Pout          string          `json:"pout"                             gorm:"column:pout;type:longtext;not null;comment:返回;"`
	Mseconds      int             `json:"mseconds"                         gorm:"column:mseconds;DEFAULT:0;not null;comment:耗时;"`
	HtplatId      int64           `json:"htplatId,string"                    gorm:"column:htplat_id;DEFAULT:0;not null;comment:平台编号;"`
	HtuserloginId int64           `json:"htuserloginId,string"                    gorm:"column:htuserlogin_id;DEFAULT:0;not null;comment:登录编号;"`
	Ip            string          `json:"ip"           validate:"max=50"   gorm:"column:ip;size:50;DEFAULT:'';not null;comment:IP;"`
	Browser       string          `json:"browser"      validate:"max=50"   gorm:"column:browser;size:50;DEFAULT:'';not null;comment:浏览器;"`
	Appver        string          `json:"appver"       validate:"max=20"   gorm:"column:appver;size:20;DEFAULT:'';not null;comment:App版本;"`
	Name          string          `json:"name"         validate:"max=50"   gorm:"column:name;size:50;DEFAULT:'';not null;comment:姓名;"`
	HtdeptId      int64           `json:"htdeptId,string"                    gorm:"column:htdept_id;DEFAULT:0;not null;comment:机构编码;"`
	HtdeptName    string          `json:"htdeptName"   validate:"max=100"  gorm:"column:htdept_name;size:100;DEFAULT:'';not null;comment:机构名称;"`
	CrtDt         datetime.MyTime `json:"crtDt"                            gorm:"column:crt_dt;not null;comment:创建日期;"`
	CrtUid        int64           `json:"crtUid,string"                    gorm:"column:crt_uid;DEFAULT:0;not null;comment:用户编号;"`
	CrtDid        int64           `json:"crtDid,string"                    gorm:"column:crt_did;DEFAULT:0;not null;comment:机构编号;"`
}

func (p *HtActionLog) TableName() string {
	return "HtActionLog"
}
func init() {
	var mcls = &HtActionLog{}
	var m = &class.MyClass{
		Name:     "操作日志表",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  "",
		Type:     reflect.TypeOf(mcls),
	}
	selfreg.AddEntity(m)
}
